package pers.chao.cacheable.core.annotation;

import pers.chao.cacheable.core.consts.CacheExpireUnit;
import pers.chao.cacheable.core.consts.CacheStrategy;
import pers.chao.cacheable.core.consts.Division;

import java.lang.annotation.*;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Cache {
	String prefix();
	String key();
	Division separator() default Division.DOUBLE_COLON; // key分隔符
	CacheStrategy strategy() default CacheStrategy.NECAEU; // 缓存策略
	CacheExpireUnit unit() default CacheExpireUnit.SEC; // 过期时间单位
	String expire() default "0";
	boolean evict() default false; // 清除缓存标识
	boolean update() default false; // 更新标识，非更新即为查询模式
}
